<script>
export default {
  name: 'Empty',

  components: {
  },

  props: {
    // 图片地址
    imageUrl: {
      type: String,
      default: require('@/assets/images/empty.png')
    },
    // 图片样式
    imageStyle: {
      type: Object,
      default() {
        return {
          width: '60px',
          height: '60px'
        }
      }
    },
    // 文字描述
    description: {
      type: String,
      default: '暂无数据'
    }
  },

  data() {
    return {

    };
  },

  mounted() {
    
  },

  methods: {
    
  },

  render(h) {
    return h('div', {
      attrs: {
        id: 'empty'
      }
    }, [
      // 图片
      h('img', {
        attrs: {
          src: this.imageUrl
        },
        style: this.imageStyle
      }),
      // 描述文字
      h('span', {
        domProps: {
          innerHTML: this.description
        }
      })
    ]);
  }
};
</script>

<style lang="less" scoped>
#empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  >span {
    margin-top: 10px;
    color: #9b9b9b;
  }
}
</style>